import logging
import yagmail

#封装日志
def rzhi():
    logging.basicConfig(filename='./log/kongfuzi.txt',level=logging.DEBUG,filemode='w+',format='%(asctime)s ->%(levelno)s-> %(message)s')


#封装邮件
def setup(fielp):
    mail=yagmail.SMTP(user='1006142636@qq.com',host='smtp.qq.com',password='mduzpggkpknubgac')
    mail.send(to='1006142636@qq.com',subject='孔夫子报告',contents='今日报告,请查看',attachments=fielp)
